Skip to content

Harden Release versioning against lagging publishes and tag collisions#56

Merged
mariojgt merged 1 commit into
mainfrom
harden-release-versioning
Jul 14, 2026
Merged

Harden Release versioning against lagging publishes and tag collisions#56
mariojgt merged 1 commit into
mainfrom
harden-release-versioning

Conversation

@ejntaylor

Copy link
Copy Markdown
Contributor

The Release workflow bumped from the npm latest version and checked for tag collisions with git rev-parse against a checkout that never fetched tags. When a publish lagged behind (npm sat on 0.3.6 while tag v0.3.7 existed), every run recomputed the same 0.3.7, and the ineffective guard let the collision surface as a raw HTTP 422: Release.tag_name already exists. This computes the bump from the highest of the latest git tag and the npm latest — so the next version is always strictly above the newest tag — and replaces the guard with a real git ls-remote --tags origin check (plus fetch-depth: 0 so tags are available). Aligns with the repo's "git tag is the source of truth" principle.

🤖 Generated with Claude Code

… the remote

The Release workflow bumped from the npm `latest` and guarded tag
collisions with `git rev-parse` against a checkout that never fetched
tags. When a publish lagged (npm behind the tags), every run recomputed
the same version and the ineffective guard let the collision surface as
a raw HTTP 422 from `gh release create`.

Now the bump is computed from the highest of the latest git tag and the
npm latest (tag = source of truth), so the next version is always strictly
higher, and the guard checks `git ls-remote --tags origin` for a real
answer.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderbuds

coderbuds Bot commented Jul 14, 2026

Copy link
Copy Markdown

Workflow now fetches full git history and correctly handles version bumps and tag collisions.

🎯 Quality: 96% Elite · 📦 Size: Small

📈 This month: Your 220th PR — above team average · Averaging Excellent

See how your team is trending →

@mariojgt mariojgt merged commit 4a3c39d into main Jul 14, 2026
4 checks passed
@mariojgt mariojgt deleted the harden-release-versioning branch July 14, 2026 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants